package com.certificationManager.client.service;

import com.certificationManager.client.bean.UserBean;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * @author Benjamin Barbier
 *
 */
@RemoteServiceRelativePath("userService.rpc") // Remote procedure call
public interface UserService extends RemoteService {
	
	/**
	 * @param user
	 * @throws Exception
	 */
	void register(UserBean user) throws Exception;
	
	/**
	 * @param email
	 * @param password
	 * @return
	 */
	boolean isRegistered(String email, String password);
	
	/**
	 * @param key
	 * @param callback
	 * @return
	 */
	UserBean getUser(String key);
}
	